home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_unix / j109lxa4.tar / ftpcli.h < prev    next >
C/C++ Source or Header  |  1994-06-04  |  2KB  |  56 lines

  1. /* Mods by G1EMM and PA0GRI */
  2. #ifndef _FTPCLI_H
  3. #define _FTPCLI_H
  4.  
  5. #include <stdio.h>
  6.  
  7. #ifndef _FTP_H
  8. #include "ftp.h"
  9. #endif
  10.  
  11. #ifndef _SESSION_H
  12. #include "session.h"
  13. #endif
  14.  
  15. #ifndef _DIRUTIL_H
  16. #include "dirutil.h"
  17. #endif
  18.  
  19. #define LINELEN 256             /* Length of user command buffer */
  20.  
  21. #define CTLZ    26              /* EOF for CP/M systems */
  22.  
  23. /* Per-session FTP client control block */
  24. struct ftpcli {
  25.     int control;            /* Control socket */
  26.     int data;               /* Data socket */
  27.  
  28.     char state;
  29. #define COMMAND_STATE   0       /* Awaiting user command */
  30. #define SENDING_STATE   1       /* Sending data to user */
  31. #define RECEIVING_STATE 2       /* Storing data from user */
  32. #define EXITING_STATE    3    /* Connection closed down */
  33.  
  34.     int16 verbose;          /* Transfer verbosity level */
  35. #define V_QUIET         0       /* Error messages only */
  36. #define V_SHORT         1       /* Final message only */
  37. #define V_NORMAL        2       /* display control messages */
  38. #define V_HASH          3       /* control messages, hash marks */
  39. #define V_BYTE          4       /* control messages, byte count */
  40.  
  41.     int batch;              /* Command batching flag */
  42.     int abort;              /* Aborted transfer flag */
  43.     char type;              /* Transfer type */
  44.     char typesent;          /* Last type command sent to server */
  45.     int logbsize;           /* Logical byte size for logical type */
  46.     FILE *fp;               /* File descriptor being transferred */
  47.     char *line;             /* Response from the server */
  48.  
  49.     struct session *session;
  50.     char *password;
  51.     struct cur_dirs *curdirs;
  52. };
  53. #define NULLFTP (struct ftpcli *)0
  54.  
  55. #endif  /* _FTPCLI_H */
  56.